import request from '@/api/request.js'

// 获取订单列表
export const GetOrderListApi = data => {
	return request(`/order/orderInfo/pageList`, 'POST', data)
}
//获取接单相似推荐
export const GetOrderfreshDetailApi = data => {
	return request(`/order/orderInfo/freshDetail`, 'GET', data)
}

// 获取接单列表
export const GetReceiveListApi = data => {
	return request(`/order/orderInfo/takeList`, 'POST', data)
}
// 1接单2;//申请验收3;//申请异常4;// 申请撤销5;// 申请仲裁6;// 验收完成
export const GetUpdateOrderStatusApi = data => {
	return request(`/order/orderInfo/updateOrderStatus`, 'POST', data)
}
//获取接单订单详情
export const GetOrderInfoDetailApi = data => {
	return request(`/order/orderInfo/detail`, 'GET', data)
}

//上传首图
export const GetUploadImageApi = data => {
	return request(`/order/orderMessageBoard/saveMessage`, 'POST', data)
}
//	自助下单获取价格
export const SaveSelfHelpOrderApi = data => {
	return request(`/system/gamesPackagePrice/priceCount`, 'POST', data)
}

//	自助下单保存订单信息
export const SaveOrderInfoApi = data => {
	return request(`/order/orderInfo/saveOrderInfo`, 'POST', data)
}

//	自助下单，确认下单
export const ConfirmPaymentApi = data => {
	return request(`/pay/payOrder/deal`, 'POST', data)
}

//	订单消息
export const GetOrderMsgListApi = data => {
	return request(`/order/orderMessageBoard/queryMessagePage`, 'GET', data, false)
}

// 订单留言版
export const GetOrderMsgBoardListApi = data => {
	return request(`/order/orderMessageBoard/pageList`, 'GET', data, false)
}
//消息-用户查看订单专用
export const SaveOrderMsgBoardListApi = data => {
	return request(`/order/orderMessageBoard/save`, 'POST', data, false)
}
//	订单留言板消息发送
export const SendOrderMsgApi = (data, isLoading) => {
	return request(`/order/orderMessageBoard/saveMessages`, 'POST', data, isLoading)
}

// 获取游戏区服
export const GetRegionListApi = data => {
	return request(`/system/gamesTypeTagRegion/queryRegionByGamesId`, 'GET', data, false)
}

// 订单-通知列表
export const GetNotificationApi = data => {
	return request(`/system/noticeStation/pageList`, 'GET', data, false)
}
//订单详情点击关注
export const GetUserFocusedApi = data => {
	return request(`/system/userFocused/save`, 'GET', data)
}
//订单详情取消关注
export const DelUserFocusedApi = data => {
	return request(`/system/userFocused/cancellation`, 'GET', data)
}
//加价
export const AddOrderAmountApi = data => {
	return request(`/order/orderInfo/addOrderAmount`, 'GET', data)
}
//打赏打手
export const RaisePriceApi = data => {
	return request(`/pay/payOrder/raisePrice`, 'POST', data)
}
//筛选列表
export const gamesSearchApi = data => {
	return request(`/system/gamesSearch/querySearch`, 'GET', data, false)
}

//筛选游戏
export const GetAllGamesListApi = data => {
	return request(`/system/gamesInfo/queryAllGames`, 'GET', data)
}

// 根据字典传入不同字典的name得到不同列表        筛选验收时长  介入率列表
export const GetSearchTimeListApi = data => {
	return request(`/system/ruleDictType/queryByName`, 'GET', data, false)
}

//待支付的单子取消订单
export const cancelOrderByOrderId = data => {
	return request(`/order/orderInfo/cancelOrderByOrderId`, 'GET', data)
}

//	查询消息 未读消息
export const GetMsgReadDotApi = data => {
	return request(`/order/orderMessageBoard/queryRead`, 'GET', data, false)
}

//	设置消息已读状态
export const SetMsgReadDotApi = data => {
	return request(`/order/orderMessageBoard/updateReadByOrderId`, 'GET', data, false)
}

//	查询通知 未读通知
export const GetInformReadDotApi = data => {
	return request(`/system/noticeStation/isRead`, 'GET', data, false)
}

//	设置已读通知
export const SetInformReadDotApi = data => {
	return request(`/system/noticeStation/updateIsRead`, 'GET', data, false)
}

//	修改游戏账号密码
export const SetGamesPwdApi = data => {
	return request(`/order/orderInfo/updatePwdForOrder`, 'POST', data, false)
}

//	账号信息锁定
export const LockGamesInfoApi = data => {
	return request(`/order/orderInfo/accountLock`, 'GET', data, false)
}

//收藏足迹列表
export const collectPageList = data => {
	return request(`/order/orderUserConcern/queryByType`, 'GET', data)
}
//保存 收藏 足迹
export const SaveCollect = data => {
	return request(`/order/orderUserConcern/save`, 'POST', data, false)
}
//取消 收藏 
export const DeletesCollect = data => {
	return request(`/order/orderUserConcern/deleteByOrderNo`, 'GET', data, false)
}

//用于我要抢单查询会员
export const queryVipList = data => {
	return request(`/system/userMemberCard/pageList`, 'GET', data, false)
}
//是否是首次开通会员
export const queryIsFirstVip = data => {
	return request(`/system/userMember/queryByUserId`, 'GET', data, false)
}

//	获取当前订单是否可抢单
export const GetOrderStatus = data => {
	return request(`/order/orderInfo/getStatus`, 'GET', data, false)
}

//	查询是否上传首图
export const GetOrderIsUploadImg = data => {
	return request(`/order/orderInfoRel/detailByOrderId`, 'GET', data)
}

//留言消息个数
export const GetOrderMsgNumApi = data => {
	return request(`/order/orderMessageBoard/queryReadCount`, 'GET', data)
}
